package com.dingreading.cloud.admin.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.mybatisflex.annotation.Column;
import com.mybatisflex.annotation.Id;
import com.mybatisflex.annotation.KeyType;
import com.mybatisflex.annotation.Table;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Date;

/**
 * 实体类。
 *
 * @author Administrator
 * @since 2024-03-21
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Table(value = "goods_type_combo")
public class GoodsTypeCombo implements Serializable {

    private static final long serialVersionUID = 1L;

    @Id(keyType = KeyType.Auto)
    private Long id;

    @JsonFormat(locale = "zh", timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @Column(onInsertValue = "now()")
    private Date addTime;

    @JsonFormat(locale = "zh", timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @Column(onInsertValue = "now()", onUpdateValue = "now()")
    private Date editTime;

    /**
     * 关联的商品id
     */
    @ApiModelProperty(value = "关联的商品id")
    private Long mainGoodsId;

    /**
     * 关联的商品规格id
     */
    @ApiModelProperty(value = "关联的商品规格id")
    private Long mainGoodsTypeId;

    /**
     * 启用状态 1.启用 0.禁用
     */
    @ApiModelProperty(value = "启用状态")
    private Integer enabled;

    /**
     * 商品id
     */
    @ApiModelProperty(value = "商品id")
    private Long goodsId;

    /**
     * 商品规格id
     */
    @ApiModelProperty(value = "商品规格id")
    private Long goodsTypeId;

    /**
     * 可售数量
     */
    @ApiModelProperty(value = "可售数量")
    private Integer num;

}
